<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<script type="text/javascript" th:src="@{~/managed/assets/js/jquery.form.js}"></script>
<body>   
	<div class="modal-dialog" style="width:35%">
		<div class="modal-content" >
			<div class="modal-header no-padding">
				<div class="table-header">
					<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
						<span class="white">&times;</span>
					</button>
					<p th:text="${title}"></p>
				</div>
			</div>

			<div class="modal-body no-padding" >

			<form class="form-horizontal" id="cateForm" role="form" th:action="@{/manage/article/cateEdit}" method="post" th:object="${cate}">
			    <input type="hidden" name="act" th:value="${act}" />
			    <input type="hidden" th:field="*{cateId}" th:if="${#strings.equalsIgnoreCase(act, 'edit')}" />
				<div class="form-group">
					<label class="col-sm-3 control-label no-padding-right"
						for="form-field-1">分类名称</label>

					<div class="col-sm-9">
						<input type="text" th:field="*{cateName}" class="col-xs-10 col-sm-9" />
					</div>
				</div>

				<div class="form-group">
					<label class="col-sm-3 control-label no-padding-right"
						for="form-field-1-1"> 分类状态 </label>

					<div class="col-sm-9">
					    <select th:field="*{cateStatus}"  class="col-xs-10 col-sm-9">
					          <option value="1">激活</option>
					          <option value="0">未激活</option>
					    </select>						
					</div>
				</div>
			<div class="modal-footer no-margin-top">
				<button class="btn btn-sm pull-left" data-dismiss="modal">
					<i class="icon-remove"></i>关闭&nbsp;
				</button>
				<button class="btn btn-sm btn-info pull-right"
					onclick="saveRecord()" type="button">
					<i class="icon-ok"></i>提交
				</button>
			</div>
			</form>
		</div>
	</div>
</div>
<script type="text/javascript">
    function saveRecord() {
		var cate_form = $("#cateForm");
		var table = $("#manager-table");
		ajax_form(cate_form,null,table);
	}
</script>
<script type="text/javascript" th:src="@{~/managed/common/blog.js}"></script>
</body>
</html>